import request from "@/utils/request";

// 获取素材分类类型列表,分页
export function getMaterialTypeList(data) {
  return request({
    url: "/MaterialType/list",
    method: "get",
    params: data,
  });
}

// 获取详细数据
export function getMaterialTypeById(data) {
  return request({
    url: "/MaterialType/ " + data,
    method: "get",
  });
}

// 添加素材分类类型数据
export function addMaterialType(data) {
  return request({
    url: "/MaterialType",
    method: "post",
    data: data,
  });
}

// 修改素材分类类型数据
export function updateMaterialType(data) {
  return request({
    url: "/MaterialType/update",
    method: "put",
    data: data,
  });
}

// 删除素材分类类型数据 (单个删除)
export function deleteMaterialType(data) {
  return request({
    url: "/MaterialType/" + data,
    method: "delete",
  });
}

// 批量删除素材分类类型数据
export function deleteMaterialTypeBatch(data) {
  return request({
    url: "/MaterialType/batch",
    method: "delete",
    data: data,
  });
}

// 获取素材分类名称列表
export function getMaterialTypeNameList() {
  return request({
    url: "/MaterialType/type",
    method: "get",
  });
}
